﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Model
{

    [DataContract]
    [MB.Orm.Mapping.Att.ModelMap("OrderInfo", "OrderInfo", new string[] { "DETAILNO" })]
    [KnownType(typeof(OrderInfo))]
    public class OrderInfo : MB.Orm.Common.BaseModel
    {
        public OrderInfo()
        {

        }
        private Int64 _DETAILNO;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("DETAILNO", System.Data.DbType.Int64)]
        public Int64 DETAILNO { get { return _DETAILNO; } set { _DETAILNO = value; } }

        private String _ORDERNO;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("ORDERNO", System.Data.DbType.String)]
        public String ORDERNO { get { return _ORDERNO; } set { _ORDERNO = value; } }

        private String _EXLOCATION;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("EXLOCATION", System.Data.DbType.String)]
        public String EXLOCATION { get { return _EXLOCATION; } set { _EXLOCATION = value; } }

        private String _REAMRK;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("REAMRK", System.Data.DbType.String)]
        public String REAMRK { get { return _REAMRK; } set { _REAMRK = value; } }

        private String _REAMRK1;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("REAMRK1", System.Data.DbType.String)]
        public String REAMRK1 { get { return _REAMRK1; } set { _REAMRK1 = value; } }

        private DateTime _FINISHTIME;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("FINISHTIME", System.Data.DbType.DateTime)]
        public DateTime FINISHTIME { get { return _FINISHTIME; } set { _FINISHTIME = value; } }

        private DateTime _CREATE_DATE;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("CREATE_DATE", System.Data.DbType.DateTime)]
        public DateTime CREATE_DATE { get { return _CREATE_DATE; } set { _CREATE_DATE = value; } }

        private DateTime _UPDATE_DATE;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("UPDATE_DATE", System.Data.DbType.DateTime)]
        public DateTime UPDATE_DATE { get { return _UPDATE_DATE; } set { _UPDATE_DATE = value; } }

        private int _FLAG;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("FLAG", System.Data.DbType.Int32)]
        public int FLAG { get { return _FLAG; } set { _FLAG = value; } }

        private String _AREA;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("AREA", System.Data.DbType.String)]
        public String AREA { get { return _AREA; } set { _AREA = value; } }

        private DateTime _ORDERTIME;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("ORDERTIME", System.Data.DbType.DateTime)]
        public DateTime ORDERTIME { get { return _ORDERTIME; } set { _ORDERTIME = value; } }

        private DateTime _RATIONDATE;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("RATIONDATE", System.Data.DbType.DateTime)]
        public DateTime RATIONDATE { get { return _RATIONDATE; } set { _RATIONDATE = value; } }
        private int _RATIONTIME;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("RATIONTIME", System.Data.DbType.Int32)]
        public int RATIONTIME { get { return _RATIONTIME; } set { _RATIONTIME = value; } }

        private String _BATCH_NO;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("BATCH_NO", System.Data.DbType.String)]
        public String BATCH_NO { get { return _BATCH_NO; } set { _BATCH_NO = value; } }

        private String _BATCH_SUBNO;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("BATCH_SUBNO", System.Data.DbType.String)]
        public String BATCH_SUBNO { get { return _BATCH_SUBNO; } set { _BATCH_SUBNO = value; } }

        private String _APPORDERNO;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("APPORDERNO", System.Data.DbType.String)]
        public String APPORDERNO { get { return _APPORDERNO; } set { _APPORDERNO = value; } }

        private int _STATUS;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("STATUS", System.Data.DbType.Int32)]
        public int STATUS { get { return _STATUS; } set { _STATUS = value; } }

        [DataMember]
        public List<string> FBOXS { get; set; }
        
        [DataMember]
        public List<OrderInfoDetail> OrderInfoDetail { get; set; }
    }

    [DataContract]
    [MB.Orm.Mapping.Att.ModelMap("OrderInfoDetail", "OrderInfoDetail", new string[] { "DETAILNO" })]
    [KnownType(typeof(OrderInfoDetail))]
    public class OrderInfoDetail : MB.Orm.Common.BaseModel
    {
        public OrderInfoDetail()
        {

        }

        private Int64 _DETAILNO;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("DETAILNO", System.Data.DbType.Int64)]
        public Int64 DETAILNO { get { return _DETAILNO; } set { _DETAILNO = value; } }

        private String _ORDERNO;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("ORDERNO", System.Data.DbType.String)]
        public String ORDERNO { get { return _ORDERNO; } set { _ORDERNO = value; } }

        private String _LOCATION;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("LOCATION", System.Data.DbType.String)]
        public String LOCATION { get { return _LOCATION; } set { _LOCATION = value; } }

        private int _ITEMID;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("ITEMID", System.Data.DbType.Int32)]
        public int ITEMID { get { return _ITEMID; } set { _ITEMID = value; } }


        private String _ITEMCODE;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("ITEMCODE", System.Data.DbType.String)]
        public String ITEMCODE { get { return _ITEMCODE; } set { _ITEMCODE = value; } }

        private String _ITEMNAME;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("ITEMNAME", System.Data.DbType.String)]
        public String ITEMNAME { get { return _ITEMNAME; } set { _ITEMNAME = value; } }
        
        private Decimal _QTY;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("QTY", System.Data.DbType.Decimal)]
        public Decimal QTY { get { return _QTY; } set { _QTY = value; } }

        private Decimal _PQTY;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("PQTY", System.Data.DbType.Decimal)]
        public Decimal PQTY { get { return _PQTY; } set { _PQTY = value; } }

        private String _REAMRK;
        [DataMember]
        [MB.Orm.Mapping.Att.ColumnMap("REAMRK", System.Data.DbType.String)]
        public String REAMRK { get { return _REAMRK; } set { _REAMRK = value; } }
    }
}
